package tarantula.instrumenter;

public 

//per test
class SourcePosExecInfo {
	public final SourcePos pos;
	public final int freq;
	public final String result;
	
	public SourcePosExecInfo(SourcePos pos, int freq, String result) {
		assert pos != null;
		assert freq > 0;
		assert result != null;
		
		this.pos = pos;
		this.freq = freq;
		this.result = result;
	}
	
	@Override
	public int hashCode() {
		return pos.hashCode() + 79*freq + result.hashCode();
	}
	
	@Override
	public boolean equals(Object obj) {
		if(!(obj instanceof SourcePosExecInfo)) {
			return false;
		}
		SourcePosExecInfo info = (SourcePosExecInfo)obj;
		return info.pos.equals(this.pos)
		    && info.freq == this.freq
		    && info.result.equals(this.result);
	}
}